Skip to content

Commit

Permalink
Explain paper parser
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoWinterhalter committed Oct 25, 2024
1 parent 55200a5 commit 706aae3
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,60 @@ description.

- `bluesky`: *URL* to your BlueSky account.

## Papers

We provide some tools to input your publications and drafts in JSON format.
For instance:
````json
``` paper
"title": "Towards automatic academic pages",
"authors": "Templato Urnehm, U. N. Owen",
"venue": "Principles of Awesomeness (PAW)",
"year": "2023",
"url": "https://basicpage.github.io",
"files": [
{ "text": "Paper", "type": "pdf", "src": "foo.pdf" },
{ "text": "Bibtex", "type": "bib", "src": "foo.bib" },
{ "text": "Formalisation", "type": "code", "src": "foo.v" }
]
```
````

> [!WARNING]
> Make sure to respect JSON syntax, in particular place commas where they are
> needed, and only there. Test locally before you push.

The file that handles papers is `pandoc/paper.lua` and you may modify it to suit
your needs. Currently, it expects the fields `title` and `authors` (it will
assume them to be empty otherwise), while the other fields (`venue`, `year`,
`url` and `files`) are optional.

- `title`: Title of your paper. Will be used as header of the block.
- `authors`: List of authors.
- `venue` (optional): Journal or conference.
- `year` (optional): Date of the conference, if present it is going to be in
parentheses after the venue (unless the venue is absent in which case it
will be alone on its line without parentheses). A more precise date is
possible, in the end this is just treated as a string.
- `url` (optional): If present, the header will also be a link pointing to the
provided URL.
- `files` (optional): A list of files that will be presented as links on one
line with an icon depending on the file type.
Each item must contain the following fields that will be assumed empty if
absent:
+ `text`: Text that will appear.
+ `src`: URL to the file, it can be local.
+ `type`: Type of file. If no value is present, then the icon will be that of
an undifferentiated file.
The possible values are:
* `pdf`
* `bib`
* `code`
* `video`
* `txt`
* `img`
* `zip`
* `slides`

## Sharing files

Expand Down
7 changes: 6 additions & 1 deletion src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,15 @@ My workflow is usually to use <kbd>Ctrl</kbd> + <kbd>C</kbd> /
{ "text": "Poem", "type": "txt", "src": "foo.txt" },
{ "text": "My picture", "type": "img", "src": "img/profile.png" },
{ "text": "💣", "type": "zip", "src": "foo.zip" },
{ "text": "Slides", "type": "slides", "src": "foo.key" }
{ "text": "Slides", "type": "slides", "src": "foo.key" },
{ "text": "Some random file", "src": "foo.rand" }
]
```

## Talks

None yet.

# Education

- I was able to paint with my hands in kindergarten.
Expand Down

0 comments on commit 706aae3

Please sign in to comment.