Giter Site home page Giter Site logo

Comments (16)

JessW avatar JessW commented on July 20, 2024 1

I don't think I saw your screenshot before, @Ilis , it's lovely!

I just sent a pull request with the advanced configuration options that we talked about awhile back. Once the update is available, let me know what you think if you get a chance! (Apologies for the delay.)

from cinnamon-spices-desklets.

NikoKrause avatar NikoKrause commented on July 20, 2024

I noticed this as well. It seems, that it's a mix of Quote of the Day and Command of the day. But in French.
The problem right now is that all quotes are still in English. It would be great, if you could guide the user to install a localized version of fortune in his language, then it would be redundant.

Can you also send a pull request and fix the author info:
https://github.com/linuxmint/cinnamon-spices-desklets/blob/master/quoteOfTheDay%40tinnu/info.json

It's better to use the GitHub Name to be able to notify the author about issues/feature requests.

Thanks

from cinnamon-spices-desklets.

JessW avatar JessW commented on July 20, 2024

Thanks, @NikoKrause, those are both great suggestions, will do!

from cinnamon-spices-desklets.

Ilis avatar Ilis commented on July 20, 2024

@JessW @NikoKrause

Now Quote of the Day use fortune to get quote.

  • citationsfr works just like older version of Quote of the Day, but includes one file with fr-quotes
  • Command of the day works like newer version of Quote of the Day, but like fortune called without any parameters (it gives user one quote out of all quotes files in users language if fortunes-XX installed or all of default English quotes)

If one make settings for Quote of the Day to choose between no parameter and file, then desklet override functionality of both alternative desklets. Say, it will be checkbox “Use custom file”. If unchecked, then fortune called without file parameter, if checked, then user can choose file name.

Even more, desklet can has text field setting to give extra options for fortune such as -l, -s, -o, -m pattern and so on.

from cinnamon-spices-desklets.

JessW avatar JessW commented on July 20, 2024

@logg

Thanks for wading through Command of the Day to see how it works, @Ilis ! I would say at the very least the name is misleading, as the readme for the desklet explains it was really just created to allow the author to run fortune -o, and I wonder if it has been tested with any other commands.

I am a little hesitant to add a setting to Quote of the Day to make the input file optional. I wonder if that would seem confusing to a user who doesn't know how fortune works? I think your point, Ilis, about allowing no file is that then fortune will automatically pick a file in the user's language, if available, did I understand that correctly?

I do like the idea of allowing additional parameters to fortune, as you mentioned.

I'm going to go now and update the docs for Quote of the Day to include instructions for adding localized quotes, and that may resolve the issue with citationsfr, at least.

from cinnamon-spices-desklets.

Ilis avatar Ilis commented on July 20, 2024

Hi, @JessW

I am a little hesitant to add a setting to Quote of the Day to make the input file optional. I wonder if that would seem confusing to a user who doesn't know how fortune works? I think your point, Ilis, about allowing no file is that then fortune will automatically pick a file in the user's language, if available, did I understand that correctly?

If user know about fortune, he would like to give parameters he want to get fortunes he want.

If user didn't know fortune, he will be in trouble to choose custom file except files come with fortune.

As for me, the best way to call fortune without parameters and give users fortunes from several pre-installed files. If user don't like it, he will open Preferences and can tune QotD by two ways:

  • Simplest: chose custom file
  • Tricky: learn fortune and set up it by parameters

Other point is to install language package...

You forced me to look into fortune source :)

http://bazaar.launchpad.net/~vcs-imports/fortune-mod/main/view/head:/fortune/fortune.c

There are section for localization output of fortunes:

lang=getenv("LC_ALL");
if (!lang) lang=getenv("LC_MESSAGES");
if (!lang) lang=getenv("LANGUAGE");
if (!lang) lang=getenv("LANG");

If no options -o or -a for fortune, then program tries to find fortunes in directory corresponded to setted up language, i. e. ru directory for ru_RU.utf8 locale. If no such directory, then fortunes looked up in root directory for fortune shared files. One of them will be literature, and in any case it will be non-offensive fortunes.

So, in Preferences dialogue we can give user a hint to install language pack for his locale.

3 ways above can give user full control on setting up QotD.

Instructions for user about composing his own file will make him happy :)

from cinnamon-spices-desklets.

JessW avatar JessW commented on July 20, 2024

Okie dokie, so.

  1. Yesterday I added some instructions to the README about installing fortunes for the user's locale. I like your idea to add a hint in the Preferences dialog to go check the readme for help with this.
  2. I also added some more instructions for creating a custom input file, based on your example of combining multiple existing fortune files (thank you!)
  3. I will add a text box to the Preferences dialog to allow the user to pass additional parameters, e.g. -s, etc., to fortune
  4. Are you saying your favorite way to run fortune is without passing it a file? Now that I've compared the fortune packs for English and Russian, I think I have a better understanding of your point - there are lots more files in Russian! What do you think if I put the "no input file" option at the bottom of the Preference dialog as an "advanced" option? I would like a user to be able to run QotD out of the box without reading the readme and without being confused. But I think as an English speaker I'm biased on this point, so I'd like to hear your opinion, @Ilis !

from cinnamon-spices-desklets.

Ilis avatar Ilis commented on July 20, 2024

so I'd like to hear your opinion

Well, I try to explain it on my own experience.

fortune is my favourite “game” from that times when I used Linux via terminal. I used it as session greeter, I used it as source of some portion of text in my scripts, I used it in pipes, i. e. fortune | cowsay. Then every time I install new instance of Linux I starting terminal and issue a fortune command.

At the beginning I was glad I start fortune and get some random text. Later I found a fortunes-ru package with a lot of quotes and become much happier. Then I realised that more then a half of set of quotes are not interesting for me, and I sorted out how I can issue some parameters for fortune to get exactly what I want.

And I dreamed about to make my own set of quotes. Now I can do all above (thanks to you!).

So, my order of using is

  1. Just use it with no option.
  2. Use it with name of file out of standard package.
  3. Use it with names of files out of standard and extra packages.
  4. Use it with my own file.
ilis@deore ~ $ fortune
Каждый человек действует для себя, по своему плану, а выходит общее
действие, исполняется другой - высший - план, и из суровых, тонких,
гнилых биографических нитей сплетается каменная ткань Истории.
		-- М.Погодин
ilis@deore ~ $ fortune literature
My only love sprung from my only hate!
Too early seen unknown, and known too late!
		-- William Shakespeare, "Romeo and Juliet"
ilis@deore ~ $ fortune literature art
Песня - это звучание души, иногда доставляющее удовольствие окружающим.
		-- Виктор Кротов
ilis@deore ~ $ fortune ~/diamond-arm
Семё-он Семёныч!..
        — Володя

Note, that default behaviour of QotD is like you call fortune literature without full path to file.

It means that the file chooser only needed when you want to choose your own file (and you have to know how to prepare that one), ant it become unnecessary option (due to possibility to give full file name with path in option), but, certainly, more convenient to average user.

And after all I have no receipt for how better make QotD :)

from cinnamon-spices-desklets.

Ilis avatar Ilis commented on July 20, 2024

Now it seems to me QotD can be GUI for fortune with ability to show fortunes on screen using nice fonts!
2017-06-15 22-10-42

from cinnamon-spices-desklets.

Ilis avatar Ilis commented on July 20, 2024

Hi, @JessW

I checked new configuration options, it seems they work.

So, main thing of this issue is closed. Installing fortune-fr or choosing appropriate file can fully replace citationfr and has extra functionality. The same about Command of the day.

Thank you for this nice desklet!

from cinnamon-spices-desklets.

Ilis avatar Ilis commented on July 20, 2024

@JessW , please, would you update *.pot for new items to localize?

from cinnamon-spices-desklets.

JessW avatar JessW commented on July 20, 2024

@Ilis , thank you for checking the new options, I'm glad to hear they work for you too!

@NikoKrause , I've updated the Quote of the Day desklet with some instructions for installing localized fortune files, in case you think that might be enough to deprecate citationsfr? I also added options to pass flags to fortune when running Quote of the Day, possibly making Command of the Day redundant also.

from cinnamon-spices-desklets.

JessW avatar JessW commented on July 20, 2024

@Ilis , I'll definitely update the *.pot file, I didn't realize I needed to do that!

from cinnamon-spices-desklets.

NikoKrause avatar NikoKrause commented on July 20, 2024

If you think that those applets are redundant, can you create a PR, which deletes those applets?

from cinnamon-spices-desklets.

JessW avatar JessW commented on July 20, 2024

from cinnamon-spices-desklets.

NikoKrause avatar NikoKrause commented on July 20, 2024

Closed by #198

from cinnamon-spices-desklets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.