Skip to content

Export for academicpages.github.io #12806

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

Closed
wants to merge 5 commits into from

Conversation

kaushikaW
Copy link
Contributor

@kaushikaW kaushikaW commented Mar 23, 2025

draft for issue #12727

Implemented Steps So Far
File Format Selection:
When the user selects "MARKDOWN" as the export format, JabRef generates Markdown files based on the selected entries.
File Generation Process:
If the user exports the entire library (e.g., 6 entries) and specifies a filename (e.g., "publication"), JabRef creates six separate Markdown files, each corresponding to a different entry.
The files follow the naming convention "doc-fileNo.md" (e.g., doc-1.md, doc-2.md, etc.). (See Screenshot 2.)
Current Layout File Progress:
The markdown.layout file implementation is in progress.
Currently, it correctly saves the title of each entry.

acadeicspages github repo - https://github.com/kaushikaW/kaushikaW.github.io/tree/master

Does my current implementation align with the expected requirements? Are any feedback or adjustments needed?

screenshot 1
image

screenshot 2
image

  • I own the copyright of the code submitted and I license it under the MIT license
  • Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (if change is visible to the user)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@kaushikaW kaushikaW changed the title partially implemented the requirement Export for academicpages.github.io #12727 Mar 23, 2025
@kaushikaW kaushikaW changed the title Export for academicpages.github.io #12727 Export for academicpages.github.io Mar 23, 2025
Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some initial comments.

This is far away from a complete solutioion.

You HAVE TO create a page using https://github.com/academicpages/academicpages.github.io AND INCLUDE A SCREENSHOT here - otherwise, it does not make sense to work on this task.

Comment on lines 213 to 215
// handling Markdown file exporting logic
if (getFileType() == StandardFileType.MARKDOWN) {
String userProvidedName = file.getFileName().toString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not good architecture. Check how the other exporters do it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I implemented the exporting logic in separate class as AcademicPagesExporter . can you check whether my process is write . I'm still under development of creating the layout .

@@ -62,6 +62,7 @@ public static ExporterFactory create(CliPreferences preferences) {
exporters.add(new EmbeddedBibFilePdfExporter(bibDatabaseMode, preferences.getCustomEntryTypesRepository(), fieldPreferences));
exporters.add(new CffExporter());
exporters.add(new EndnoteXmlExporter(preferences.getBibEntryPreferences()));
exporters.add(new TemplateExporter("MARKDOWN", "md", "markdown", null, StandardFileType.MARKDOWN, layoutPreferences, saveOrder));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See line 46 - this one should be close to that.

Name is wrong - because Markdown can have different facets. Similar to text - can be structured in many formats (Cff, EndnoteXml, ...). Call it "academicpages.github.io" or similar.

Comment on lines 258 to 260
// The exception indicates that no type-specific layout
// exists, so we
// go with the default one.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use exception for nomral control flow. There is also Files.exist etc.

}

// Write the entry
if (layout != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When can a layout be null?

Map<EntryType, Layout> layouts = new HashMap<>();
Layout layout;

Number.serialExportNumber = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

@koppor
Copy link
Member

koppor commented Mar 23, 2025

Related PR: #12220

@JabRef JabRef deleted a comment from github-actions bot Mar 29, 2025
@jabref-machine
Copy link
Collaborator

You have removed the "Mandatory Checks" section from your pull request description. Please adhere to our pull request template.

@jabref-machine
Copy link
Collaborator

Note that your PR will not be reviewed/accepted until you have gone through the mandatory checks in the description and marked each of them them exactly in the format of [x] (done), [ ] (not done yet) or [/] (not applicable).

Copy link

trag-bot bot commented Mar 29, 2025

@trag-bot didn't find any issues in the code! ✅✨

@kaushikaW kaushikaW requested a review from koppor March 29, 2025 18:51
@jabref-machine
Copy link
Collaborator

JUnit tests are failing. You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page. To see the test output, locate "Tests / Unit tests (pull_request)" and click on it.

You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.

@koppor
Copy link
Member

koppor commented Apr 1, 2025

You have removed the "Mandatory Checks" section from your pull request description. Please adhere to our pull request template.

What our bot means: The heading is not existing. Please re-add the heading in your PR description.

@koppor
Copy link
Member

koppor commented Apr 1, 2025

JUnit tests are failing. You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page. To see the test output, locate "Tests / Unit tests (pull_request)" and click on it.

What our bot means: Reviews are eaiser if automated tests succeed.

@koppor
Copy link
Member

koppor commented May 12, 2025

Think, the AI used for crafting code in this PR changed too much.

Closing this issue due to inactivity 💤 Please ping us if you intend to resume work on this one.

@koppor koppor closed this May 12, 2025
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.

3 participants