Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 3.66 KB

other_parameters.md

File metadata and controls

34 lines (23 loc) · 3.66 KB

Other possible customizations

** ⚠️ NOTE:** Since some of the data, such as the title or bullet points, and other information generated by functions like title_generator or the bp_generator, are very difficult to generalize without specific probabilistic techniques and really depend on the grammar of the specific language of the phrases to detect the best solutions, I have decided not to include this part of the code in the project. I will only provide a very generalized version. However, in the different functions, you can find a detailed comment and the skeleton of the function already prepared to be personalized. So, you can personalize the function without too much effort.

Time to wait before starting the next iteration

In the file time_scheduler.py you can change the function waiting_next_iteration to change the time to wait before starting the next iteration. The function take randomly with a certain probability a time to wait in the list before start the next request. By changing the values in the lists you can increase or decrease the time to wait.

Change the number of message to send

In the file function_toolbox.py you can change the function choose_max_offers_number to change the number of message to send at each iteration. Also in this case there is a probability to choose a number in a range of values. By changing the probability or the value you can select how many messages to send each time.

Markup Button in the message

In the file message.py you can change the function markdown_generator to change the text and links of the button sended with the messages.

Change the message text

In the file message.py you can change the function html_message to modify the text of the message.

Change the title od the message

In the file message.py you can change the function title_generator to modify the title of the message.

Change the bullet point in the message

In the file message.py you can change the function bp_generator to modify the bullet point used in the message.

Change the image font used in the image

In the file image_generator.py you can change the function gen_img to modify the font used in the image. The Poppins font is used by default. You must also add the font file in the folder src/media/font.

Use a custom image

To use a custom image you must find a service in which upload the image generated the return the url of the image. Since there are different services and each service have a different api to do it you must personalize the function upload_img in the file image_generator.py to use the service you want. The function must return the url of the image uploaded. By default the function use the default image given by amazon (The one with the with background). The bot generate in any case the image with the personalized background and delete the image at the end for preserve space. When you have found the service to store the image you have only to operate inside that function. More information are available in the function.

NOTE: One of the most popular service is imgur that provide also the API. And you can use it for free for personal use. If you make some money from it's use on your code you must pay the subscription based on what is written at this moment in the documentation. I assume no responsibility for the improper use of this service or any other service you decide to use

Change the background image

The most easy way to change the background image is to just replace the image in the folder src/media/template. Replace the image with the name backg-1.jpgwith you custm image that must have the same name and must be in the .jpg format.