Skip to content
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

Refresh journal lists periodically #5749

Merged
merged 24 commits into from
Aug 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/refresh-journal-lists.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Refresh Journal Lists

on:
schedule:
# run on 1st and 15th of each month
- cron: '2 20 1,15 * *'
workflow_dispatch:
# Allow to run manually

jobs:
publish:
name: Refresh Journal List Files
runs-on: ubuntu-latest
steps:
- name: Fetch all history for all tags and branches
uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 14
- uses: actions/cache@v1
name: Restore gradle wrapper
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Update journal lists
run: |
set +o pipefail

# prepare journal lists
cd /tmp
git clone --depth=1 https://github.com/JabRef/abbrv.jabref.org.git
cd abbrv.jabref.org/journals

# remove all lists without dot in them
# we use abbrevatiation lists containing dots in them only (to be consistent)
rm journal_abbreviations_entrez.csv
rm journal_abbreviations_medicus.csv
rm journal_abbreviations_webofscience-dots.csv

# prepare building
mkdir -p $GITHUB_WORKSPACE/build/journals
cp * $GITHUB_WORKSPACE/build/journals/

# create .mv file
cd $GITHUB_WORKSPACE
./gradlew generateJournalAbbreviationList

# git commit
git config user.email "jabrefmail+webfeedback@gmail.com"
git config user.name "JabRef refresh journal lists [bot]"
git add . && git commit -m"Update journalList.mv"
- uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
src/main/gen/
src/main/generated/

# the journal list cache
*.mv

# private data
/buildres/jabref-cert-2016.p12

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve

### Changed

- JabRef now offers journal lists from <https://abbrv.jabref.org>. JabRef the lists which use a dot inside the abbreviations. [#5749](https://github.com/JabRef/jabref/pull/5749)

### Fixed

### Removed
Expand Down
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,7 @@ task generateSource(dependsOn: ["generateBstGrammarSource",
"generateMedlineSource",
"generateBibtexmlSource",
"generateEndnoteSource",
"generateModsSource",
"generateJournalAbbreviationList"]) {
"generateModsSource"]) {
group = 'JabRef'
description 'Generates all necessary (Java) source files.'
}
Expand Down Expand Up @@ -365,7 +364,7 @@ task generateJournalAbbreviationList(type: JournalAbbreviationConverter) {
group = 'JabRef'
description = "Converts the comma-separated journal abbreviation file to a H2 MVStore."

inputDir = file("src/main/resources/journals")
inputDir = file("build/journals")
outputDir = file("src/main/resources/journals")
}

Expand Down
Loading