Skip to content

Add citer-cli#38

Draft
jwilk wants to merge 149 commits into
5j9:mainfrom
jwilk-forks:cli
Draft

Add citer-cli#38
jwilk wants to merge 149 commits into
5j9:mainfrom
jwilk-forks:cli

Conversation

@jwilk

@jwilk jwilk commented Sep 2, 2022

Copy link
Copy Markdown
Contributor

This adds a command-line interface.
Useful for people like me who despise web interfaces. Might be also useful for debugging.

The code is not pretty, but hey, it works.

Example:

$ ./citer-cli 10.1007/978-1-4302-6713-3_3
{{sfn | Akramullah | 2014 | pp=55–100}}

* {{cite book | last=Akramullah | first=Shahriar | title=Digital Video Concepts, Methods, and Metrics | chapter=Video Coding Standards | publisher=Apress | publication-place=Berkeley, CA | year=2014 | isbn=978-1-4302-6712-6 | doi=10.1007/978-1-4302-6713-3_3}}

<ref name="Akramullah 2014 pp. 55–100">{{cite book | last=Akramullah | first=Shahriar | title=Digital Video Concepts, Methods, and Metrics | chapter=Video Coding Standards | publisher=Apress | publication-place=Berkeley, CA | year=2014 | isbn=978-1-4302-6712-6 | doi=10.1007/978-1-4302-6713-3_3 | pages=55–100}}</ref>

5j9 and others added 30 commits March 13, 2019 21:26
Sites change frequently and it's hard to keep up with them.
Apparently linux systems cannot process paths containing .. in the
middle.
Apparently not supported in git version 2.1.4.
ketab.ir includes isbns for other countries too. Example:
0-7817-8870-6: http://www.ketab.ir/bookview.aspx?bookid=1488857
Using absolute path on toolforge fixes some css/js loading issues when
the tool address does not end with a forward slash.
Because of the downsides of `git update-index --skip-worktree config.py`:
https://stackoverflow.com/a/55351856/2705757
Thanks to User:Forbes72 for reporting the issue.
Fixes:

    FileNotFoundError: [Errno 2] No such file or directory: 'lib/html/en.css'

when current working directory is not the source root directory.
Don't assume anything about cwd
Per recent update on English Wikipedia[1]

Thanks to User:Peaceray and daniel-barrows for notifying me about
this change.

closes 5j9#14
5j9 and others added 27 commits June 9, 2022 15:08
doi.org will automatically redirect to best registration agency.
https://citation.crosscite.org/docs.html
The main issue was resolved in 6beaa8c .
This commit only adds a test.

closes 5j9#35
forgot to add in the previous commit
The dict is then converted to scr tuple inside app.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants