Showing posts with label elementary. Show all posts
Showing posts with label elementary. Show all posts

Wednesday, September 13, 2017

Try Vocal A Podcast Manager Designed For elementary OS

Try Vocal A Podcast Manager Designed For elementary OS


Vocal is a podcast manager designed to integrate tightly with the elementary OS desktop, which supports both audio and video podcasts, with built-in video playback.


The application doesnt have every feature you can think of and instead it focuses on what its supposed to do: play podcasts while taking care of everything automatically, without going through N tabs of settings.

For instance, Vocal can stream episodes without having to download them locally however, if you want to save some episodes for offline listening, Vocal can do that too - it can even automatically check for and download new episodes in the background.

Another useful feature is its library management: Vocal can automatically delete old downloads so you dont have to worry about doing this yourself.

Vocal elementary OS

Also, since the app was designed for elementary OS, it integrates perfectly with the Pantheon desktop: it comes with native notifications, launcher count and progress bar support, media keys support and Sound Menu integration.

Other Vocal features include:
  • you can assign custom skip intervals for the skip forward and backwards buttons, useful if for instance youve missed something or to jump past an advertisement;
  • episode position saving, you can can easily start an episode from where you left off;
  • supports library import/export (can import from iTunes, gPodder, etc.).

For those are new to podcasts, the Vocal website offers "starter pack" which contains a selection of great podcasts which you can add either individually or as a complete .opml pack which you can import into Vocal. Note that in my test, the imported podcasts didnt show up in Vocal until I restarted the application.

While the app reached version 1.0 recently, there are a couple of missing features: Vocal lacks a search/filter and it cant download feeds which require authentication, but hopefully theyll be added in a future release.

Its important to note that while Vocal was designed for elementary OS, it should work on any desktop environment that supports header bars (also known as client side decorations) and has GTK 3.14 or newer. As far as *buntu is concerned, Vocal should work on the following:
  • Ubuntu GNOME / Xubuntu 15.04;
  • Ubuntu GNOME 14.10 with GNOME 3 updated to version 3.14 via PPA.
  • Ubuntu 15.04 (with Unity) - partially, because the app wont have any shadows and to avoid various parts of the app being transparent (bug caused by overlay-scrollbar), youll need to launch the app like this: "LIBOVERLAY_SCROLLBAR=0 vocal".

The app should also work on elementary OS Freya (obviously), Fedora 21 or 22, etc.


Download Vocal


Download Vocal (packages available for Fedora and Ubuntu-based distros)

Important: youll also need to download the Granite framework packages (available on the Vocal downloads page) if youre not using elementary OS or Ubuntu 15.04, or else you wont be able to install the app.

If you encounter bugs, report them @ Launchpad.

download file now

Read more »

Saturday, September 2, 2017

Tutorial 1 Hello Elementary

Tutorial 1 Hello Elementary


This post is the first in a series I am going to be publishing about using elementary and python to develop applications. The source code for all of the examples I am providing can be found in a GitHub repository here. Looking to get help with development? - We have started a programming focused section of the Bodhi Linux forums here. Other great resources for getting help are the Enlightenment devel mailing list as well as #e on freenode IRC. Ive also added the python elementary API documentation to the Bodhi website here.

Example 1:
Since most people (myself included) learn best through examples, lets dive right into the code. To start, we are going to be creating a simple window that displays some text to us. It will look something like this:


Including my comments explaining what each line of code does, it takes us less than 50 lines of code to get the above window on our screen. Lets take a look (you can also find the source code for this lesson here):

#Import the elementary library so we can use it
import elementary

#Import evas, used for resizing things
import evas

#A function that creates and shows an elementary window
def hello_elementary():
#Creates a "Standard" elementary window. The first argument is the name of our window. The second argument is the title displayed on the window bar
window = elementary.StandardWindow("hello world", "Hello Elementary")

#callback_delete_request_add tells our window what to do when its "close" button is pressed
window.callback_delete_request_add(lambda o: elementary.exit())

#Content for our window. Creates a "Label" object which display text in our window. Whenever we create an elementary object we must provide a parent window as input
windytax = elementary.Label(window)

#Tells our label object to change size based on the size of our window
windytax.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
windytax.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)

#Define what text our window should display
windytax.text = Hello Elementary!

#If we want to see our object we need to tell it to be shown
windytax.show()

#resize_object_add adds our Label object "windytax" to the window
window.resize_object_add(windytax)

#resize takes an ordered pair as input for the size for our window, the dimenions are pixel by pixel
window.resize(300,300)

#Finally lets tell our window object to show up just like we did with our label
window.show()

#Runs when our script is run
if __name__ == "__main__":
#Runs our function which creates our window
hello_elementary()

#Starts an elementary event loop which displays all elementary objects weve created. Our code stays at this point until elementary.exit() is called
elementary.run()

#Once elementary is done running lets shut everything off to finish the application
elementary.shutdown()

In this example we create two elementary objects: A StandardWindow and a Label. The StandardWindow as you can guess is the window we are creating, while the Label is a child object that we add to our window to display.

Example 2:
We want our application to do much more than just display text (most of the time). So lets go ahead and add a couple more objects to our Hello Elementary application. Lets add a button that closes our application:


The full code for this application can be found here. I will now highlight what is different from our previous example.

def hello_elementary():
...

#Create an elementary button object
button = elementary.Button(window)

#Set some text for our button
button.text = "Goodbye Elementary"

#callback_pressed_add tells our button a callback to run when our button is pressed, the first argument is the function run and the following arguments are things to pass to the callback
button.callback_pressed_add(button_pressed, "argument1", "argument2")

#Show our button
button.show()

#Since we now have multiple objects we want to display on our window, we can position these objects using an elementary box which is a container object that you can "pack" items into.

#Create a box
box = elementary.Box(window)

#Tell our box to fill all open space in our window
box.size_hint_weight_set(evas.EVAS_HINT_EXPAND, evas.EVAS_HINT_EXPAND)
box.size_hint_align_set(evas.EVAS_HINT_FILL, evas.EVAS_HINT_FILL)

#Show our box
box.show()

#Lets pack our label and then button into our box!
box.pack_end(windytax)
box.pack_end(button)

#This time lets use our box instead of just our label
window.resize_object_add(box)

#Our callback when the button is pressed. The first argument for this function will be the elementary button object. The rest of the arguments are the custom things we passed above
def button_pressed(button, arg1, arg2):
#Show the content of our arguments in terminal
print arg1, arg2

#Lets have our button close the application, so run:
elementary.exit()

Example 2 adds two more elementary objects to our application - a Box and a Button. A Box is an elementary object that we use to hold other elementary objects to they are positioned how we want them inside our application window. You "pack" items into a box that is either vertical (default) or horizontal. A Button is an object that can have text and/or images displayed on it that can fire a callback when pressed.

Resources for this Lesson:
  • Hello Elementary
  • StandardWindow
  • Label
  • Box
  • Button
~Jeff Hoogland

download file now

Read more »