Skip to content

Commit

Permalink
Needs better regex
Browse files Browse the repository at this point in the history
  • Loading branch information
EnArvy committed Mar 22, 2021
1 parent d240268 commit 467ff10
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Anicon for AniList
# Work In Progress

Add cover art from Anilist as folder icons to your anime collection.

### How do I use this?

- Download the executable from [here](https:)
- Download the executable from [here](https://github.com/EnArvy/AniconforAnilist/releases)
- Run it in your anime folder
- Choose when you're asked to
- Repeat till all folders are processed
Expand All @@ -22,6 +22,7 @@ If you're not using AutoMode, you can give a blank input when you're asked to ch

### Okay so i did everything, but the icons aren't showing up. (*panicks*)
Your PC may take some time to index those icons. They should show up in 2 to 5 minutes. I guess.
Note:Usually making chnages to files inside the folder makes icon appear(such as creating a new txt file or something).

### Alright. It works but I'm curious as to how?
It, uhhh
Expand All @@ -40,3 +41,8 @@ Yeah, the most efficient way to use this (imo) would be to:
- Move out the incorrectly tagged folders and delete their icons
- Run it in ManualMode and choose the correct results

## Building from source
Requirements: python installed along with pillow(use `pip install pillow`) and pyinstaller(use `pip install pyinstaller`)

Then in the directory run `pyinstaller aniconforanilist.py --onefile`

Binary file removed Screenshot 2021-03-22 000522.png~
Binary file not shown.
6 changes: 3 additions & 3 deletions aniconforanilist.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

filterwarnings("ignore")
folderlist = next(os.walk('.'))[1]
folderpath = os.path.dirname(os.path.realpath(__file__))

if folderlist is None or len(folderlist) == 0:
# In case the file is placed inside an inner most directory which contains only files and no other folders, this list will be empty.
# Thus adding the current directory path as an element of the list.
Expand Down Expand Up @@ -128,9 +128,9 @@ def createicon(folder: str, link: str):

f = open(folder + "\\desktop.ini","w+")

icopath = folderpath + '\\' + icofile

f.write("[.ShellClassInfo]\nConfirmFileOp=0\n")
f.write("IconResource={},0".format(icopath.strip("\\")))
f.write("IconResource={},0".format(icofile.replace(folder, "").strip("\\")))
f.write("\nIconFile={}\nIconIndex=0".format(icofile.replace(folder, "").strip("\\")))
f.write("\n[ViewState]\nMode=\nVid=\nFolderType=Videos")

Expand Down

0 comments on commit 467ff10

Please sign in to comment.