=== Factorize Blog ===
Contributors: webyoungstown
Tags: blog, ai writer, content research, seo, woocommerce
Requires at least: 6.2
Tested up to: 7.1
Stable tag: 1.5.0
Requires PHP: 7.4
License: Factorize License (proprietary)
License URI: https://factorize.webyoungstown.com/license/

Researched blog guides with sources, videos and your products, written as drafts for you to review.

== Description ==

Type a topic. Factorize Blog searches the web, reads the best pages, takes notes and writes a guide section by section. Every fact carries its source number, and the guide ends with the list of sources. Related videos, your in-stock products, a cover picture and a steps card are added, and it is saved as a draft with a short list of anything to check.

Not sure what to write? Type a broad topic. It collects what people search for on Google, Bing, DuckDuckGo and YouTube, groups the searches into guide ideas, and checks who answers each one today. Each idea gets four scores, each with the facts behind it: demand, gap (how poorly it is answered), ease and fit with your store.

= What it does =

* **Writes from real sources.** The writer uses only what the pages it read say, cites them, and lists them at the end.
* **Checks itself.** Citations that point nowhere are removed. Numbers that are not in any source, and a title that already exists, are flagged for you.
* **Finds ideas worth writing**, with open data only and no invented search volumes.
* **Adds what readers want**: key takeaways, a FAQ marked up for search engines, embeddable videos, your products with live prices, and openly licensed photos with credits.
* **Draws pictures**: a cover in your colour, used as the featured image, and a card of the steps.
* **Runs in the background** and survives a closed page or a busy AI server.
* **Can run by itself**: weekly or monthly idea searches that write the best ideas as drafts.

= AI and research =

The AI is Factorize AI with your Factorize key, or your own Ollama server. The research helper is the Factorize helper, reached with your Factorize key, or your own. Without the helper, a smaller set of research tools runs from your web host.

== Installation ==

1. Upload the `factorize-blog` folder to `/wp-content/plugins/` and activate it.
2. Open Factorize → Blog → Setup guide and follow the steps (a free Factorize key covers both the AI and the research helper).
3. Write your first guide on the Write tab.

== Changelog ==

= 1.4.1 =
* AI card in Settings: the current mode, Switch to larger models (your owner password, a dollar limit and a time limit on your own store), a cost estimate per task in tokens and dollars, and Buy tokens. The AI switch is no longer in the admin bar.
* Factorize dashboard: Find a module sits right above the module cards; the 7-day order and sales tiles show the last 7 days with their dates.

= 1.4.0 =
* Free or Paid AI. A new AI button in the admin bar (every wp-admin page) switches this store between Free (our GPU) and Paid (Gemini at real cost). Short jobs, pictures and embeddings always stay on Free. Cost lines on every screen now show the paid cost with a 95% range in paid mode: tokens for Premium and Unlimited, or dollars for the owner, who unlocks paid AI with a password and a limited amount. The free plan stops with a plain message. The shared hosted-AI client (hosted-ai.php) was regenerated from the template.

= 1.3.0 =
* Tighter, more useful guides. The guide opens with the answer, not an introduction. The outline is pruned against the reader's question (no Introduction, Overview or Conclusion sections, and the AI cuts sections the reader can do without). Notes now also collect the common mistakes, and the writer must name exact tools, sizes and numbers. A new "Tightening the text" step edits every part against a word budget, one small call each, and cuts anything that is not about the question. Rules in code then remove filler phrases ("in this guide", "it is important to note"), cheer-leading closings and sentences said twice. An edit is only kept when it is shorter and still has the same sources, numbers and format. A guide takes a little longer, and ends up shorter.
* Every AI call asks for 700 tokens at most when it goes through Factorize AI, so none runs into the 100 second limit. The outline is now three small calls instead of one big one.

= 1.2.1 =
* Tools for this job shows only tools the job really needs. A product must be the tool itself by its name (a "Concrete Pencil Vibrator" is not a pencil, a "Drill Kit with Battery and Charger" is not a charger), one product per tool, and the topic's key words are no longer searched as tools. The AI then checks the picks against the guide's steps and drops any that do not fit. When nothing fits, the guide has no tools section, and the log says so. Auction lots are never picked, and a card whose product sells out or becomes an auction stops showing.
* The steps card is off: it repeated the steps the guide already shows. It can be switched back on under Settings.
* Videos and pictures sit in the text column, with space above and below, instead of running wider than the text.

= 1.2.0 =
* Tools for this job: up to 4 products that match the tools the guide uses, one per tool first, never padded with unrelated items. Each card has the picture, name, live price and a reason such as "Used in step 3: drill the pilot hole". The same model in other sizes or colours counts once; accessories and open-box items rank lower.
* Pictures are credited: openly licensed photos (CC0, public domain, CC BY, CC BY-SA only) and, new, a relevant picture from the pages the guide read, credited and linked to its page. New setting "Pictures from the pages read" (on). Pictures per guide now defaults to 2. Pictures are downloaded once (5 MB cap, type, size and duplicate checks), never hotlinked.
* Sharper drawn pictures: the cover and the steps card are drawn at 2x and saved as WebP (PNG fallback), with a new design: better contrast, balanced titles, text that fits itself, a logo or letter footer.
* Easier to skim: bold key terms, short paragraphs, numbered steps with circled numbers, striped tables, coloured Tip, Warning, Safety and Note boxes, a restyled Key takeaways box and a collapsible FAQ. The writing prompts ask for these forms.

= 1.1.0 =
* Find ideas: choose how many ideas (4 to 30). Sorting stops once there are enough different ideas, so a small search is quicker and uses fewer tokens.
* Find ideas looks for overlap: ideas one guide would answer are joined, and ideas you already have (from any earlier search) or that a post on this blog covers are left out and do not count. The log says what was left out and why.
* Find ideas can have a token budget with Factorize AI (empty = no limit). It stops before a call that would go over and keeps the ideas found so far. Not shown with your own Ollama or an unlimited key, which never use tokens.
* The Guides tab shows the tokens an idea search used.

= 1.0.1 =
* Finding ideas works with Factorize AI: searches are sorted 20 a call with a short answer (50 a call took longer than Factorize AI waits, so the step failed every time).
* A call that timed out or met a gateway error waits a minute and tries again instead of failing the step.

= 1.0.0 =
* First release.
