-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run? #1
Comments
Definitely! Until then, clone the repo end enter the directory. git clone https://github.com/JockeTF/fimfarchive.git
cd fimfarchive Then create a virtual environment. The commands may vary slightly depending on your platform. python3 -m venv venv
source venv/bin/activate Make sure the above command succeeded, and install the development dependencies. pip install -r requirements.txt You can now run fimfarchive as a python module. python -m fimfarchive Note that there isn't really anything useful you can do with that command now. However, you can mess around with an archive release through the interactive interpreter. >>> # Create a fetcher instance for reading from the archive.
>>> from fimfarchive.fetchers import FimfarchiveFetcher
>>> fetcher = FimfarchiveFetcher('fimfarchive.zip')
>>>
>>> # Inspect the title of a story.
>>> story = fetcher.fetch(9)
>>> story.meta['title']
'The Greatest Equine Who has Ever Lived!'
>>>
>>> # Check the number of total words in the archive.
>>> sum(story.meta['num_words'] for story in fetcher)
2081635416
>>>
>>> # Do the same thing, but with a fancy progress bar.
>>> from fimfarchive.utils import tqdm
>>> sum(story.meta['num_words'] for story in tqdm(fetcher))
72%|################## | 120536/166411 [00:15<00:06, 7639.93it/s] |
Could you please add some documentation as to how to get this up and running? All the commands from cloning the repo (I already figured that part out :P but I figure it's good to include for completeness) to creating the final zip.
The text was updated successfully, but these errors were encountered: