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

[Feature/Enhancement Request] Full Book names in displayed links #21

Open
abbasou opened this issue Oct 19, 2022 · 5 comments
Open

[Feature/Enhancement Request] Full Book names in displayed links #21

abbasou opened this issue Oct 19, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@abbasou
Copy link

abbasou commented Oct 19, 2022

Thank you so much for this awesome plugin. It makes my sermon writing that much easier instead of having to copy from a different Bible app and paste, then fix the formatting.

One hopefully small thing I would like is to present the references (Book, chapter, verse(s)) with full book names. The actual link of course has to match whatever the file names are, which are usually a shortened form, especially if folks are like me and just using the BibleGateway-to-Obsidian script to download their Bibles. So basically, the link currently looks like [[Gen 1#1|Gen 1.1]], it would be nice if it was automatically presented as [[Gen1#1|Genesis 1.1]]. Currently it's not that difficult to do a Find & Replace, but I figure a simple script would hopefully be a quick fix. Dunno how you would account for different short forms though. Looks like with the above script at least the folder names are the full name, so maybe look at the parent folder for the link alias?

I would love to contribute such a seemingly small thing myself, but alas, my coding skills are non-existent. Maybe I'll take this little thing as a learning opportunity. Who knows?

@abbasou abbasou changed the title [Feature/Enhancement Request] [Feature/Enhancement Request] Full Book names in displayed links Oct 19, 2022
@kuchejak kuchejak added the enhancement New feature or request label Oct 22, 2022
@kuchejak
Copy link
Owner

Hi, 

thank you for reaching out. I will try to look into this one day, but I can not promise it will be any time soon.

The problem also is that there are no requirements for the folder names, and for example the Obsidian Bible Study Kit (which is probably the most popular way to get bible files) does not name folders in a "nice" way (they include numbers so that the folders are displayed in order), so the proposed solution would not work for the majority of people.

@potatochick2020
Copy link

potatochick2020 commented Oct 24, 2023

I think a similar "Mapping" Hack that I suggested in another issue (#28) could solve this problem too.

We could create a map in settings for user to map filename to the desired output

Filename Generated display book name
Gen Genesys
1Cor 1Corinthians

In src/logic/copy-command.ts , we coupld find whether there is an exist mapping for the fileName

if (beginVerse === maxVerse) {
		res += `[[${pathToUse ? pathToUse + "/" : ""}${fileName}#${
			headings[beginVerse].heading
		}|${bookAndChapterOutput}${
			settings.oneVerseNotation
		}${beginVerseNoOffset}]]${postfix}`; // [[Gen 1#1|Gen 1,1.1]]
	} else if (settings.linkEndVerse) {
		res += `[[${pathToUse ? pathToUse + "/" : ""}${fileName}#${
			headings[beginVerse].heading
		}|${bookAndChapterOutput}${
			settings.multipleVersesNotation
		}${beginVerseNoOffset}-]]`; // [[Gen 1#1|Gen 1,1-]]
		res += `[[${pathToUse ? pathToUse + "/" : ""}${fileName}#${
			headings[maxVerse].heading
		}|${maxVerseNoOffset}]]${postfix}`; // [[Gen 1#3|3]]
	} else {
		res += `[[${pathToUse ? pathToUse + "/" : ""}${fileName}#${
			headings[beginVerse].heading
		}|${bookAndChapterOutput}${
			settings.multipleVersesNotation
		}${beginVerseNoOffset}-${maxVerseNoOffset}]]${postfix}`; // [[Gen 1#1|Gen 1,1-3]]
	}

I can do the coding if you approve this features.

@kuchejak
Copy link
Owner

Hi @potatochick2020, I'm not sure that this would be used by many people because they would have to fill out the dictionary for all the 66 books, which is quite a task. I understand that full book names may sometimes be nicer, but I also think that the shortened form is quite alright.

As I mentioned in #28, I feel like the plugin settings are getting quite overwhelming, so I'm not the biggest fan of adding even more options, but if you are willing to do the coding, then I'm not entirely against it. Just please make sure that the setting description is easily understood. 

@abbasou
Copy link
Author

abbasou commented May 9, 2024

Just coming back to say I appreciate this plugin and how much easier it makes my life. Was wondering if there has been any further discussion or thought about the above proposed solution and setting. I personally would be happy to fill out a dictionary once vs go back and touch up every reference I insert (for some reason it bugs me to have the shortened names). I understand the hesitation to present such a daunting list in the settings, but I believe it would be fairly self-explanatory and easily ignored if the user doesn't want to bother.

@kuchejak
Copy link
Owner

Hi, there has been no further discussion sadly, @potatochick2020 mentioned he would be willing to do the coding, but I guess they did not find the time yet or doesn't need the functionality anymore. I would like to implement the suggestion from #28 and I could also tackle this one with it, but it will have to wait until my exam period is finished (or maybe the urge to procrastinate will be high enough and I'll do it sooner).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants